home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1998 / MacHack 1998.toast / Programming Contest / Problems Folder / Problem 04 - Text Processing / Solution.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-05-25  |  691 b   |  43 lines  |  [TEXT/CWIE]

  1. #ifndef __SOLUTION_H__
  2. #define __SOLUTION_H__
  3.  
  4. // Do not modify this file
  5.  
  6. #include <MacTypes.h>
  7. #include <Files.h>
  8.  
  9. #ifdef __cplusplus
  10. extern "C" {
  11. #endif // __cplusplus
  12.  
  13. const int kMaxHandleSize = 1000000;
  14.  
  15. enum {
  16.     kActionMove = 1,
  17.     kActionInsert = 2,
  18.     kActionDelete = 3,
  19.     kActionSearch = 4,
  20.     kActionSearchAndReplace = 5
  21. };
  22.  
  23. enum {
  24.     kFlagCaseSenstitiveBit = 0,
  25.     kFlagGlobalBit = 1,
  26.     kFlagBackwardsBit = 2
  27. };
  28.  
  29. typedef struct ActionRecord {
  30.     UInt32 action;
  31.     SInt32 amount;
  32.     UInt32 flags;
  33.     Str255 search;
  34.     Str255 replace;
  35. } ActionRecord;
  36.  
  37. pascal void TextProcess( Handle data, UInt32 action_count, ActionRecord *actions );
  38.  
  39. #ifdef __cplusplus
  40. }
  41. #endif // __cplusplus
  42.  
  43. #endif // __SOLUTION_H__